// $ANTLR 3.4 D:\\Java\\oop-example\\oop-example\\src\\antlr\\MultiFar.g 2013-01-22 15:47:33

package antlr.output; 

import com.oop.example.processing.ParseError;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

import org.antlr.runtime.tree.*;


@SuppressWarnings({"all", "warnings", "unchecked"})
public class MultiFarParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ALTERNAT_HEADER", "ANY_CHAR", "COLON", "COMMA", "COMMENT", "COMMENT_IN_SIMPLE", "CUSTOM", "DATE", "DOT", "DOUBLESHARP", "EXAMPLE", "EXAMPLE_BODY", "EXAMPLE_END", "EXAMPLE_HEADER", "FIXED_EXAMPLE", "HEADER", "HOMONYM", "ITALIC_IN_SIMPLE", "LABEL", "LONG_SLASH", "L_BRACKET", "L_PARENTHESIS", "L_TRIANGULAR", "NOTCOMMENT", "NO_CHAR", "NUMERATION", "NUM_FIXED_EXAMPLE", "PART_IRREG", "PLUS", "PORTU_LETER", "PORTU_WORD", "PROC", "REFERENCE", "REF_CLAS", "R_BRACKET", "R_PARENTHESIS", "R_TRIANGULAR", "SEMI", "SHARP", "SIMPLE", "SIN", "SLASH", "STAR", "SUB_NUMERATION", "SUP", "TERE", "TOCLASSIF", "TRANSCRIPTION", "VAR", "VEJA", "WS"
    };

    public static final int EOF=-1;
    public static final int ALTERNAT_HEADER=4;
    public static final int ANY_CHAR=5;
    public static final int COLON=6;
    public static final int COMMA=7;
    public static final int COMMENT=8;
    public static final int COMMENT_IN_SIMPLE=9;
    public static final int CUSTOM=10;
    public static final int DATE=11;
    public static final int DOT=12;
    public static final int DOUBLESHARP=13;
    public static final int EXAMPLE=14;
    public static final int EXAMPLE_BODY=15;
    public static final int EXAMPLE_END=16;
    public static final int EXAMPLE_HEADER=17;
    public static final int FIXED_EXAMPLE=18;
    public static final int HEADER=19;
    public static final int HOMONYM=20;
    public static final int ITALIC_IN_SIMPLE=21;
    public static final int LABEL=22;
    public static final int LONG_SLASH=23;
    public static final int L_BRACKET=24;
    public static final int L_PARENTHESIS=25;
    public static final int L_TRIANGULAR=26;
    public static final int NOTCOMMENT=27;
    public static final int NO_CHAR=28;
    public static final int NUMERATION=29;
    public static final int NUM_FIXED_EXAMPLE=30;
    public static final int PART_IRREG=31;
    public static final int PLUS=32;
    public static final int PORTU_LETER=33;
    public static final int PORTU_WORD=34;
    public static final int PROC=35;
    public static final int REFERENCE=36;
    public static final int REF_CLAS=37;
    public static final int R_BRACKET=38;
    public static final int R_PARENTHESIS=39;
    public static final int R_TRIANGULAR=40;
    public static final int SEMI=41;
    public static final int SHARP=42;
    public static final int SIMPLE=43;
    public static final int SIN=44;
    public static final int SLASH=45;
    public static final int STAR=46;
    public static final int SUB_NUMERATION=47;
    public static final int SUP=48;
    public static final int TERE=49;
    public static final int TOCLASSIF=50;
    public static final int TRANSCRIPTION=51;
    public static final int VAR=52;
    public static final int VEJA=53;
    public static final int WS=54;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


    public MultiFarParser(TokenStream input) {
        this(input, new RecognizerSharedState());
    }
    public MultiFarParser(TokenStream input, RecognizerSharedState state) {
        super(input, state);
    }

protected TreeAdaptor adaptor = new CommonTreeAdaptor();

public void setTreeAdaptor(TreeAdaptor adaptor) {
    this.adaptor = adaptor;
}
public TreeAdaptor getTreeAdaptor() {
    return adaptor;
}
    public String[] getTokenNames() { return MultiFarParser.tokenNames; }
    public String getGrammarFileName() { return "D:\\Java\\oop-example\\oop-example\\src\\antlr\\MultiFar.g"; }


      @Override
      public void reportError(RecognitionException e) {
        throw new ParseError(e.charPositionInLine, "error");
      }


    public static class prog_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "prog"
    // D:\\Java\\oop-example\\oop-example\\src\\antlr\\MultiFar.g:34:1: prog : HEADER ;
    public final MultiFarParser.prog_return prog() throws RecognitionException {
        MultiFarParser.prog_return retval = new MultiFarParser.prog_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token HEADER1=null;

        CommonTree HEADER1_tree=null;

        try {
            // D:\\Java\\oop-example\\oop-example\\src\\antlr\\MultiFar.g:34:6: ( HEADER )
            // D:\\Java\\oop-example\\oop-example\\src\\antlr\\MultiFar.g:34:8: HEADER
            {
            root_0 = (CommonTree)adaptor.nil();


            HEADER1=(Token)match(input,HEADER,FOLLOW_HEADER_in_prog65); 
            HEADER1_tree = 
            (CommonTree)adaptor.create(HEADER1)
            ;
            adaptor.addChild(root_0, HEADER1_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "prog"

    // Delegated rules


 

    public static final BitSet FOLLOW_HEADER_in_prog65 = new BitSet(new long[]{0x0000000000000002L});

}